<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html>
<head>
    <title>${requestScope.data.article.title}</title>
</head>
<body>
<link href="${pageContext.request.contextPath}/resources/shop/css/article.css" rel="stylesheet" type="text/css"/>
<div class="container articleContent">
  <div class="span6">
    <div class="hotArticleCategory">
      <div class="title">热点分类</div>
      <c:forEach var="item" items="${requestScope.data.categories}" varStatus="index">
        <c:choose>
          <c:when test="${index.index==fn:length(requestScope.data.categories)-1}">
            <dl class="last">
          </c:when>
          <c:otherwise>
            <dl>
          </c:otherwise>
        </c:choose>
        <dt>
          <a href="${pageContext.request.contextPath}/article/list.html?id=${item.id}">${item.name}</a>
        </dt>
        </dl>
      </c:forEach>
    </div>
    <div class="hotArticle">
      <div class="title">热点文章</div>
      <ul>
        <c:forEach items="${requestScope.data.hotArticles}" var="item">
          <li>
            <a href="${pageContext.request.contextPath}/article/content.html?id=${item.id}"
               title="${item.title}">
              <div style="width: 215px;overflow:hidden; white-space: nowrap; -o-text-overflow: ellipsis; text-overflow:  ellipsis;">${item.title}</div>
            </a>
          </li>
        </c:forEach>
      </ul>
    </div>
  </div>
  <div class="span18 last">
    <div class="path">
      <ul>
        <li>
          <a href="${pageContext.request.contextPath}">首页</a>
        </li>
        <li><a href="${pageContext.request.contextPath}/article/list.html?id=${requestScope.data.cagetory.id}">${requestScope.data.cagetory.name}</a></li>
        <li class="last">${requestScope.data.article.title}</li>
      </ul>
    </div>
    <div class="main">
      <h1 class="title">${requestScope.data.article.title}</h1>
      <div class="info">
        日期:<fmt:formatDate value="${requestScope.data.article.createDate}"  pattern="yyyy-MM-dd HH:mm:ss" />
       <%-- 点击数: <span id="hits">${requestScope.data.article.hits}</span>--%>
      </div>
      <div class="content">${requestScope.data.article.content}</div>
    </div>
  </div>
</div>

</body>
</html>
